package com.feizhi.common.search.index.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.apache.lucene.document.Field.Store;

/**
 * Annotation used for marking a property as indexable.
 *
 * @author shuaqiu
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Documented
public @interface Field {

    /**
     * @return Returns the field name. Defaults to the JavaBean property name.
     */
    String name() default "";

    /**
     * @return Returns a {@code Store} enum type indicating whether the value should be stored in the document. Defaults to {@code Store.NO}.
     */
    Store store() default Store.NO;

}
